package cn.yuhh.api.manage.api;

import cn.yuhh.api.helper.ApiResponse;
import cn.yuhh.api.service.AbstractApiService;
import cn.yuhh.core.domain.User;
import cn.yuhh.core.type.Role;
import com.magic.spring.mongo.Mongo;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @author ysw
 * @create 2020-03-01-11:57
 * @descreption 管理人员列表
 **/
@Component("userList1.0")
public class UserListService extends AbstractApiService {
    @Override
    public Map service(Map request) {
        List<User> list = Mongo.buildMongo().ne("role", Role.DECLARER).findAll(User.class);
        return ApiResponse.success(list);
    }
}
